<div id="tids-progress">

    <?php $this->addScriptPath('../application/views/scripts/'); ?>
    <?= $this->paginationControl($this->paginator, 'Sliding', 'paginator.phtml') ?>

    <div class="clr"></div>

    <table class="dataActions" width="100%" border="0" cellpadding="0" cellspacing="0" >

        <tr>
            <th><?php echo (isset($this->id))?'Switch':'Cabinet'; ?></th>
            <th>Planning</th>
            <th>Marketing</th>
            <th>Street digging</th>
            <th>House digging</th>
            <th>Installation</th>
            <th>Economy</th>
        </tr>
        <?php foreach ($this->paginator as $item) { ?>
            <script>
                $(function() {
                    $( "#<?php echo (isset($this->id))?$item['switch_id']:$item['id']; ?>" ).progressbar({
                        value: <?php echo intval($item['progress']); ?>
                    });
                });    
            </script>
            <tr>
                <td><div id=""><?php echo (isset($this->id))?$item['switch_name']:$item['name']; ?></div></td>
                <td><div id="<?php echo (isset($this->id))?$item['switch_id']:$item['id']; ?>"></div></td>
                <td><div id=""></div></td>
                <td><div id=""></div></td>
                <td><div id=""></div></td>
                <td><div id=""></div></td>
                <td><div id=""></div></td>
            </tr>           
        <?php } ?>


    </table>
</div>
<script>
    function updateList(id){
        $("#tids-progress").load("<?= $this->baseURI(); ?>home/tidsplan/list/"+id);
    }
</script>